package com.hnas.trade.domain;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

import com.alibaba.fastjson.JSON;
import com.hnas.common.util.CommonReturn;
import com.hnas.common.util.PostServerInfoGet;
import com.hnas.core.util.SpringContextUtil;

public class BuyCardRemindThread implements Runnable{
	
	private static Log log = LogFactory.getLog(BuyCardRemindThread.class);

	private Object sendData;
	
	public BuyCardRemindThread(Object sendData){
		this.sendData = sendData;
	}
	
	private PostServerInfoGet postServerInfoGet;
	
	@Override
	public void run() {
//		PostConnServer postConnServer = new PostConnServer();
		this.postServerInfoGet = (PostServerInfoGet) SpringContextUtil.getBean("postServerInfoGet");
		try {
			System.out.println("发送购卡微信消息提醒");
			CommonReturn commonReturn = postServerInfoGet.SendWxBuyCardMsgBdt(sendData);
			System.out.println("发送购卡微信消息提醒完成："+JSON.toJSON(commonReturn));
		} catch (Exception e) {
			e.printStackTrace();
			log.info("发送购卡微信提醒失败");
		}
	}

}
